Main Page | Class List | Class Members

BustaEngine Class Reference

Busta'Sandwich Engine. More...

#include <BustaEngine.h>

List of all members.

Public Member Functions

 BustaEngine ()
 Constructor.
 ~BustaEngine ()
 Destructor.
ScreenState getState ()
 Gets the current/next screen state.
void setState (ScreenState s)
 Sets current/next screen state.
void mainMenu ()
 Main Menu.
void optionsMenu ()
 Options Menu.
void highScores ()
 High Scores Screen.
void characterSelectSP ()
 Character Select Screen Single Player.
void characterSelectMP ()
 Character Select Screen.
void connectScreen ()
 Connection Screen.
void keyBindingMenu ()
 Key Binding Menu.
void soundsMenu ()
 Difficulty Screen.
void difficultyMenu ()
 Difficulty Screen.
void playGame ()
 SP Game.
void displayRankings (char **rankedNames, int *scores, BustaModelCharacter *rankedCharacters)
 Ranking Screen.
char * netInit ()
 Initializes network.
char * connectIP (char *ip)
 Initializes network connection.
int moveLeft (int col_curr, int align_curr)
 moves cursor left
int moveRight (int col_curr, int align_curr)
 moves cursor right
int moveUp (int row_curr, int align_curr)
 moves cursor up
int moveDown (int row_curr, int align_curr)
 moves cursor down
int swap (int row_curr, int col_curr, int align_curr)
 Swaps two ingredients on the game board.
int rotate (int row_curr, int col_curr, int align_curr)
 rotates alignment cursor clockwise
BustaModelCompleteSandwich * submit_cus ()
 Customer sandwich submission.
BustaModelCompleteSandwich * submit_self ()
 self sandwich submission
BustaModelCompleteSandwich * submit_opponent ()
 opponent sandwich submission
void submit_board ()
 updates board after sandwich submissions
void submit_penalty ()
 updates board after penalty sandwich submission


Detailed Description

Busta'Sandwich Engine.

Busta'Sandwich Engine for single player and networked multiplayer games.


Constructor & Destructor Documentation

BustaEngine::BustaEngine  ) 
 

Constructor.

Initializes variables

BustaEngine::~BustaEngine  ) 
 

Destructor.


Member Function Documentation

void BustaEngine::characterSelectMP  ) 
 

Character Select Screen.

Displays the character select screen, allowing users to choose characters in a multiplayer game

void BustaEngine::characterSelectSP  ) 
 

Character Select Screen Single Player.

Displays the character select screen, allowing the user to choose a character. For single player

char * BustaEngine::connectIP char *  ip  ) 
 

Initializes network connection.

Initializes the network connection, returns error messages

Returns:
Returns a char* describing any errors that occured while trying to connect to the specified ip; returns NULL if initialized properly

void BustaEngine::connectScreen  ) 
 

Connection Screen.

Displays the connection screen and handles the multiplayer connection Currently a stub function, sets to CHAR_SELECT!

void BustaEngine::difficultyMenu  ) 
 

Difficulty Screen.

Sub-menu under options, allows user to change the difficulty of the game Currently a stub function that sends back to Options menu

void BustaEngine::displayRankings char **  rankedNames,
int *  scores,
BustaModelCharacter *  rankedCharacters
 

Ranking Screen.

Displays the ranking of the players at the end of a multiplayer game, takes the names and characters to display in ranked order, with the zeroth array element the 1st player, etc

ScreenState BustaEngine::getState  ) 
 

Gets the current/next screen state.

Gets the engine (screen) state

Returns:
Returns a ScreenState describing which screen the engine should be in

void BustaEngine::highScores  ) 
 

High Scores Screen.

Displays the high scores, returns when moving to main menu

void BustaEngine::keyBindingMenu  ) 
 

Key Binding Menu.

Sub-menu under options, allows user to change the key bindings of the game Currently a stub function that sends back to Options menu

void BustaEngine::mainMenu  ) 
 

Main Menu.

Displays main menu, returns when moving to new menu

int BustaEngine::moveDown int  row_curr,
int  align_curr
 

moves cursor down

Moves cursor one space down if possible

Returns:
a 1 for succesful down movement or a 0 otherwise.

int BustaEngine::moveLeft int  col_curr,
int  align_curr
 

moves cursor left

Moves cursor one space to the left if possible

Returns:
a 1 for succesful left movement or a 0 otherwise.

int BustaEngine::moveRight int  col_curr,
int  align_curr
 

moves cursor right

Moves cursor one space to the right if possible

Returns:
a 1 for succesful right movement or a 0 otherwise.

int BustaEngine::moveUp int  row_curr,
int  align_curr
 

moves cursor up

Moves cursor one space up if possible

Returns:
a 1 for succesful up movement or a 0 otherwise.

char * BustaEngine::netInit  ) 
 

Initializes network.

Initializes the network, returns error messages

Returns:
Returns a char* describing any errors that occured; returns NULL if initialized properly

void BustaEngine::optionsMenu  ) 
 

Options Menu.

Displays the options menu, returns when moving to new menu Currently a stub function, sets back to main menu!

void BustaEngine::playGame  ) 
 

SP Game.

Displays and runs the game loop (SP or MP), returns when game over for single player, when multiplayer is over, or when explicitly exit

int BustaEngine::rotate int  row_curr,
int  col_curr,
int  align_curr
 

rotates alignment cursor clockwise

Rotates the alignment cursor to next available legal orientation on board in the clockwise direction.

void BustaEngine::setState ScreenState  s  ) 
 

Sets current/next screen state.

sets the engine (screen) state

void BustaEngine::soundsMenu  ) 
 

Difficulty Screen.

Sub-menu under options, allows user to change the sound options Currently a stub function that sends back to Options menu

void BustaEngine::submit_board  ) 
 

updates board after sandwich submissions

Moves all the rows down one and adds a new row of random ingredients on the top.

BustaModelCompleteSandwich * BustaEngine::submit_cus  ) 
 

Customer sandwich submission.

Submits last row of board to customer queue. If submission doesn't match any order then chef's eats it otherwise matching customer is removed from queue and health and tip jar are incremented appropriately.

Returns:
BustaModelCompleteSandwich object representing the submission.

BustaModelCompleteSandwich * BustaEngine::submit_opponent  ) 
 

opponent sandwich submission

Submits last row of board to currently selected opponent.

Returns:
BustaModelCompleteSandwich object representing the submission.

void BustaEngine::submit_penalty  ) 
 

updates board after penalty sandwich submission

Moves all the rows down one and adds a new row of random ingredients on the top. Also decrements from health with amount decremented dependent on freshness of sandwish.

BustaModelCompleteSandwich * BustaEngine::submit_self  ) 
 

self sandwich submission

Submits last row of board to player. If tip jar isn't full than nothing happens otherwis submitted sandwich is compared against special sandwich types.

Returns:
BustaModelCompleteSandwich object representing the submission.

int BustaEngine::swap int  row_curr,
int  col_curr,
int  align_curr
 

Swaps two ingredients on the game board.

Swaps the pieces that the movement and alignment cursor point to

Returns:
a 1 for succesful swap or a 0 otherwise.


Generated on Sun Aug 14 22:24:55 2005 for BustaSandwich Engine by  doxygen 1.4.2-20050421